import java.io.IOException;
import java.util.UUID;

import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;

/**
 * @Author: fei.wu
 * @Email: fei.wu@rograndec.com
 * @CreateDate: 2019/1/8
 * @Version: 1.0
 */
public class RequestTest {

    public void requestGet() {
        try {
            CloseableHttpClient httpClient = HttpClients.createDefault();
            HttpGet httpGet = new HttpGet("http://localhost:8080/example/demo1");
            httpClient.execute(httpGet);
            httpClient.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws Exception {
        String prefix = UUID.randomUUID().toString().replaceAll("-", "") + "::";
        for (int i = 0; i < 1; i++) {
            final String value = prefix + i;
            new Thread() {
                @Override
                public void run() {
                    RequestTest test = new RequestTest();
                    test.requestGet();
                }

            }.start();
        }
    }
}
